using System;
using System.Collections.Generic;
using System.Text;

namespace ghostDBscript.Engine.Commands
{
    public class Connect : ICommand, IHasChildren
    {
        private List<ICommand> _children = new List<ICommand>();
        public List<ICommand> Children
        {
            get { return _children; }
            set { _children = value; }
        }

        private string _host;

        public string Host
        {
            get { return _host; }
            set { _host = value; }
        }

        public string ToCommandText()
        {
            return "CONNECT " + _host;
        }

        public bool IsValid()
        {
            if (_host == null || _host.Length < 1)
                return false;
            else
                return true;
        }
    }
}
